<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="dao.Shangji"%>
<%@ page import="service.*"%>
<%@ page import="java.util.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/frame.css" rel="stylesheet" type="text/css" />
<title>测试框架</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">


</head>
	<%Shangji shangji=(Shangji)request.getAttribute("shangjiObj");
		if(shangji==null) {
			request.setAttribute("message","此条商机不存在！！");
			//response.sendRedirect("error.jsp");
			request.getRequestDispatcher("error.jsp").forward(request,response);
			return;
		}
	%>
<body>

<!-- 页头 左边栏 -->
<%@ include file="/common/header.jsp" %>
<%@ include file="/common/left-nav.jsp" %>
<script>setLeftFrame(1,1);</script>

<!-- 此处添加本页代码 -->
<div class="mainBlock">
	<table width="80%" height="600px" cellpadding="0" cellspacing="0" rows="4" cols="2" border="1px">
		<tr><th height="5%" width="10%">商机编号</th><td><%=shangji.getShangjicode() %></td></tr>
		<tr><th height="5%" >商机标题</th>	<td><%=shangji.getShangjititle() %></tr>
		<tr><th height="5%" >关键词</th>		<td><%if(shangji.getShangjikeyword()==null) {%><%="无" %><%}else{ %><%=shangji.getShangjikeyword()%> <%} %></tr>
		<tr><th height="52%" >内容</th>		<td><%=shangji.getShangjiinfo() %></tr>
		<tr><th height="8%" >提交日期</th>	<td><%=shangji.getSubmitdate().toString().substring(0,19) %></td></tr>
		<tr><th height="8%" >截止日期</th>	<td><%=shangji.getDeadline().toString().substring(0,19) %></td></tr>
		<tr>
			<th height="8%" >状态</th>
			<td>
				<%String shangjiStatus=shangji.getShangjistatus();
				  if(shangjiStatus.toLowerCase().equals("pending")){%>
				  <%="审核中" %>
				  <%} else if(shangjiStatus.toLowerCase().equals("approved")) {%>
				  <%="通过" %>
				  <%} else if(shangjiStatus.toLowerCase().equals("deny")) {%>
				  <%="未通过" %>
				  <%} %>
			</td>
		</tr>
	</table>
	<%if(shangji.getShangjistatus().equals("Deny")) {%>
	<input type="button" value="删除本条" onClick="if(confirm('是否确认删除'))	window.location='shangjiIdDelOwn.do?shangjiID=<%=shangji.getShangjiid() %>';">
	<%} %>
</div>

<!-- 页脚 -->
<%@ include file="/common/footer.jsp" %>
</body>
</html>